/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ipfms.workflow;

import java.util.EnumSet;
import java.util.HashMap;
import java.util.Map;


public enum WorkflowStatus {

    OWNER(0), SALES(1), PMO(2), AGENT(3);

    private static final Map<Integer, WorkflowStatus> lookup = new HashMap<Integer, WorkflowStatus>();

    static {
        for (WorkflowStatus s : EnumSet.allOf(WorkflowStatus.class)) {
            lookup.put(s.getStatus(), s);
        }
    }

    private final int status;

    WorkflowStatus(int status) {
        this.status = status;
    }

    public int getStatus() {
        return status;
    }

    public static WorkflowStatus get(int status) {
        return lookup.get(status);
    }

    @Override
    public String toString() {
        return String.valueOf(status);
    }
    
}
